/* 
* @Author: Jerry-chen
* @Date:   2014-07-10 02:08:04
* @Last Modified by:   Jerry-chen
* @Last Modified time: 2014-07-12 20:23:48
*/

                $(function(){
                     //AJAX获得类型属性
                     //值改变是发AJAX
                     // $('#type').mouseover(function() {
                     //     alert('df');
                     // });
                     // //获得cid
                   
                    $('#cate').change(function() {
                        //清除HTML代码
                        $('.language').empty();
                        //获得CATEID
                         var cateid = $(this).val();
                 $.ajax({
                        url: APP + '&c=Goods&m=ajax_language',
                        type: 'post',
                        dataType: 'json',
                        data: {'cateid' : cateid},
                       success:function(data){
                       	//定义字符串
                       	var language="";
                       	//时间撮
                       	var timestamp = Date.parse(new Date());
						if(data == 0){
                            //循环返回的数据
                           language +="<tr><th width='120' class='w100'>商品货号</th><td style='color:red;'>请先选择正确分类</td></tr>";
						}else{
							language +="<tr><th width='120' class='w100'>商品货号</th><td><input style='width:180px;' type='text' value='"+data+timestamp+"' name='articlenumber' /></td></tr>";

						}
						 $('.language').append(language);     
					}
           		 })
             });
           });
